<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j">
<head>
<title>#{bundle.paineleditar}</title>
<link type="text/css"
	href="#{facesContext.externalContext.requestContextPath}/style/style.css"
	rel="stylesheet" />
<script type="text/javascript" 
	src="#{facesContext.externalContext.requestContextPath}/scripts/script.js">
</script>
</head>
<body>
	<div>
		<div>
			<rich:modalPanel id="panelPro" width="600" height="275">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="#{bundle.paineledicao}"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:outputLink value="#" id="hidelink">#{bundle.sair}</h:outputLink>
						<rich:componentControl for="panelPro" attachTo="hidelink"
							operation="hide" event="onclick" />
					</h:panelGroup>
				</f:facet>
				<rich:tabPanel>
					<rich:tab label="#{bundle.paineleditprof}">
						<div>
							<h:form id="cadpro">
								<h3>									
									<h:outputText id="loginPro" value="#{bundle.painellogin}: #{eUserBean.login}" />
								</h3>
							#{bundle.painelnome}<br />
								<h:inputText required="true" id="nomePro" size="60" value="#{eUserBean.nome}" />
								<rich:message for="nomePro" style="color: blue;font-weight: bold;margin-left: 10px;" />
								<br />
								<a4j:outputPanel ajaxRendered="true">
									<h:outputText id="labelSenhaPro" rendered="#{eUserBean.novaSenha}">
										#{bundle.painelnovasenha}
									</h:outputText><br />
									<h:inputText required="true" id="passPro" value="#{eUserBean.senha}" rendered="#{eUserBean.novaSenha}">
										<f:validateLength minimum="5" />
										<f:converter converterId="KeyLowerCaseConverter"/>
									</h:inputText>
								</a4j:outputPanel>
								<rich:message for="passPro" style="color: blue;font-weight: bold;margin-left: 10px;" />
								<br />
								<a4j:commandButton value="#{bundle.painelatualizar}" id="HidePro" reRender="dtpanpro"
									action="#{eUserBean.atualizar}" oncomplete="windowclose('editaprof:cadpro:errorMsgsPro','panelPro')">
								</a4j:commandButton>
								<a4j:outputPanel ajaxRendered="true">
                    				<h:messages id="errorMsgsPro" style="display:none"></h:messages>
               					</a4j:outputPanel>
							</h:form>
							<h3>
							<h:form>
								#{bundle.paineleditnovasenha}
								<h:selectBooleanCheckbox id="chk_pro" value="#{eUserBean.chk}">  
  									<a4j:support event="onchange" action="#{eUserBean.rendNovaSenha}" reRender="passPro,labelSenhaPro" />  
								</h:selectBooleanCheckbox>								 
							</h:form>
							</h3>
						</div>
					</rich:tab>
				</rich:tabPanel>
			</rich:modalPanel>
		</div>
	</div>
</body>
</html>